#container {
	display: flex;
	padding: 20px;
	align-items:center;
	justify-content:space-between;
}
#container div {
	width: 150px;
	margin-bottom: 20px;
}
#first {
	height: 120px;
	border: #f00 1px solid;
}
#second {
	height: 100px;
	border: #f00 1px solid;
}
#third {
	height: 40px;
	border: #f00 1px solid;
}
#fourth {
	height: 200px;
	border: #0f0 1px solid;
}
@media screen and (max-width: 640px) {
      #container {
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
      }
      #fourth {
        order: -1;
      }
    }